/*******************************************************************************
 * The MOSES project, model based software engineering of networked embedded systems.
 * 
 * Copyright (C) 2010-2013, University of Applied Sciences Wildau,
 * Telematics Research Group, http://www.tm.th-wildau.de/research-group
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 3 of the
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, see <http://www.gnu.org/licenses>.
 * 
 * Contributors:
 *     University of Applied Sciences Wildau - initial API and implementation
 * 
 * If you are interested in a commercial license please contact us via 
 * e-mail: ralf.vandenhouten@th-wildau.de.
 ******************************************************************************/
package de.thwildau.tm.moses.thrift.scoping;

import org.eclipse.core.runtime.IPath;
import org.eclipse.emf.common.util.URI;

/**
 * Interface for a strategy of how files can be can be resolved.
 * 
 * @author Thomas Kistel
 * @version $Revision: 759 $
 */
public interface FileResolverStrategy {

    public static final String PLATFORM_RESOURCE_PREFIX = "platform:/resource";
    public static final char SEPARATOR = IPath.SEPARATOR;

    /**
     * Resolves the <code>importUri</code> and returns it. The parameter <code>declaringResourceUri</code>
     * declares where the imported URI has to be searched (depending on the implementing strategy).
     * 
     * @param importUri the ImportURI which should be resolved.
     * @param declaringResourceUri the URI of the file that declares the import (the relative link)
     * @return the resolved URI with the {@link #PLATFORM_RESOURCE_PREFIX}
     */
    public String resolveUri(String importUri, URI declaringResourceUri);
}
